home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_perl.idb / usr / freeware / catman / p_man / cat3 / FindBin.Z / FindBin
Encoding:
Text File  |  1998-10-28  |  3.0 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      FFFFiiiinnnnddddBBBBiiiinnnn((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))        FFFFiiiinnnnddddBBBBiiiinnnn((((3333))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       FindBin - Locate directory of    original perl script
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.        use FindBin;
  13.        use lib "$FindBin::Bin/../lib";
  14.  
  15.        or
  16.  
  17.        use FindBin qw($Bin);
  18.        use lib "$Bin/../lib";
  19.  
  20.  
  21.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.       Locates the full path    to the script bin directory to allow
  23.       the use of paths relative to the bin directory.
  24.  
  25.       This allows a    user to    setup a    directory tree for some
  26.       software with    directories <root>/bin and <root>/lib and then
  27.       the above example will allow the use of modules in the lib
  28.       directory without knowing where the software tree is
  29.       installed.
  30.  
  31.       If perl is invoked using the ----eeee option or the    perl script is
  32.       read from STDIN then FindBin sets both $Bin and $RealBin to
  33.       the current directory.
  34.  
  35.      EEEEXXXXPPPPOOOORRRRTTTTAAAABBBBLLLLEEEE    VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
  36.        $Bin        - path to bin directory    from where script was invoked
  37.        $Script    - basename of script from which    perl was invoked
  38.        $RealBin    - $Bin with all    links resolved
  39.        $RealScript    - $Script with all links resolved
  40.  
  41.  
  42.      KKKKNNNNOOOOWWWWNNNN BBBBUUUUGGGGSSSS
  43.       if perl is invoked as
  44.  
  45.          perl filename
  46.  
  47.       and _f_i_l_e_n_a_m_e does not    have executable    rights and a program
  48.       called _f_i_l_e_n_a_m_e exists in the    users $ENV{PATH} which
  49.       satisfies both ----xxxx and    ----TTTT then    FindBin    assumes    that it    was
  50.       invoked via the $ENV{PATH}.
  51.  
  52.       Workaround is    to invoke perl as
  53.  
  54.        perl    ./filename
  55.  
  56.  
  57.      AAAAUUUUTTTTHHHHOOOORRRRSSSS
  58.       Graham Barr <_b_o_d_g@_t_i_u_k._t_i._c_o_m> Nick Ing-Simmons
  59.       <_n_i_k@_t_i_u_k._t_i._c_o_m>
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 10/23/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      FFFFiiiinnnnddddBBBBiiiinnnn((((3333))))         22223333////JJJJuuuullll////99998888 ((((ppppeeeerrrrllll 5555....000000005555,,,, ppppaaaattttcccchhhh 00002222))))        FFFFiiiinnnnddddBBBBiiiinnnn((((3333))))
  71.  
  72.  
  73.  
  74.      CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
  75.       Copyright (c)    1995 Graham Barr & Nick    Ing-Simmons. All
  76.       rights reserved.  This program is free software; you can
  77.       redistribute it and/or modify    it under the same terms    as
  78.       Perl itself.
  79.  
  80.      RRRREEEEVVVVIIIISSSSIIIIOOOONNNN
  81.       $Revision: 1.4 $
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 10/23/98)
  130.  
  131.  
  132.  
  133.